--# LUXOR FRAME 3 #
-- Instance the Luxor Model for this keyframe
scene.element["luxor"].frame[3] = buildLuxorModel( 3, luxorDir )

local base = scene.element["luxor"].frame[3].base.root
local beam1 = scene.element["luxor"].frame[3].base.beam1.root
local beam2 = scene.element["luxor"].frame[3].base.beam1.beam2.root
local beam3 = scene.element["luxor"].frame[3].base.beam1.beam2.beam3.root
local dome = scene.element["luxor"].frame[3].base.beam1.beam2.beam3.dome.root
local bulb = scene.element["luxor"].frame[3].base.beam1.beam2.beam3.dome.bulb.root

-- Set keyframe positioning
base:translate(    0, 30, 50 )
base:rotate   (  -30,  0,  0 )
beam1:rotate  (   10,  0,  0 )
beam2:rotate  (   50,  0,  0 )
beam3:rotate  (  -50,  0,  0 )
dome:rotate   (   65,  0,  0 )
bulb:rotate   (    0,  0,  0 )

-- Set animation keys (for interpolation)
scene.element["luxor"].frame[3].animationKeys = 
{
	["root"]  = { 
				  ["translation"] = { ['x'] =    0, ['y'] = 30, ['z'] = 50 },
				  ["rotation"]    = { ['x'] =    0, ['y'] =  0, ['z'] =  0 }
				},
	["base"]  = { ["rotation"]    = { ['x'] =  -30, ['y'] =  0, ['z'] =  0 } },
	["beam1"] = { ["rotation"]    = { ['x'] =   10, ['y'] =  0, ['z'] =  0 } },
	["beam2"] = { ["rotation"]    = { ['x'] =   50, ['y'] =  0, ['z'] =  0 } },
	["beam3"] = { ["rotation"]    = { ['x'] =  -50, ['y'] =  0, ['z'] =  0 } },
	["dome"]  = { ["rotation"]    = { ['x'] =   65, ['y'] =  0, ['z'] =  0 } }
}

print( "Frame 3 built successfully" )